<%@ page import="kgc.NewsService.NewsService" %>
<%@ page import="kgc.NewsServiceImpl.NewsServiceImpl" %>
<%@ page import="java.util.List" %>
<%@ page import="kgc.pojo.News_Category" %>
<%@ page import="kgc.pojo.News_Comment" %>
<%@ page import="kgc.pojo.News_Detail" %>
<%@ page import="kgc.pojo.News_User" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/4/5
  Time: 12:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:useBean id="newsService" class="kgc.NewsServiceImpl.NewsServiceImpl"></jsp:useBean>

<html>
  <head>
    <title>$Title$</title>
  </head>
  <body>

      <div>
        <table>
      <%
        //NewsService newsService = new NewsServiceImpl();
        List<News_Category> list = newsService.ServiceSelectCategoryAll();
        for (News_Category category : list){
      %>
            <tr>
              <td>
                <%=category.getId()%>
              </td>
              <td>
                <%=category.getName()%>
              </td>
              <td>
                <%=category.getDate()%>
              </td>
                <td><a href="InsertManage.jsp?id=<%=category.getId()%>&num=1">新增</a></td>
                <td><a href="DeleteManage.jsp?id=<%=category.getId()%>&num=1">删除</a></td>
                <td><a href="UpdateManage.jsp?id=<%=category.getId()%>&num=1">修改</a></td>
        <%
          }
        %>
            </tr>
          </table>
        </div>




      <div>
        <table>
      <%
        //NewsService newsService = new NewsServiceImpl();
        List<News_User> list3 = newsService.ServiceSelectUserAll();
        for (News_User user : list3){
      %>
          <tr>
            <td>
              <%=user.getId()%>
            </td>
            <td>
              <%=user.getUserName()%>
            </td>
            <td>
              <%=user.getPassword()%>
            </td>
            <td>
              <%=user.getEmail()%>
            </td>
            <td>
              <%=user.getUserType()%>
            </td>
              <td><a href="InsertManage.jsp?id=<%=user.getId()%>&num=2">新增</a></td>
              <td><a href="DeleteManage.jsp?id=<%=user.getId()%>&num=2">删除</a></td>
              <td><a href="UpdateManage.jsp?id=<%=user.getId()%>&num=2">修改</a></td>
            <%
              }
            %>
          </tr>
        </table>
      </div>
  </body>
</html>
